﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="History.aspx.cs" Inherits="Altairis.FluffyCloud.WebCore.Pages.Sewen.History" %>
<asp:Content ContentPlaceHolderID="Main" runat="server">
    <div id="pagebox">
        <asp:ListView runat="server" DataSourceID="HeaderObjectDataSource">
            <ItemTemplate>
                <h1 id="title">
                    <asp:Literal Text='<%# Eval("Title", "Historie stránky {0}") %>' runat="server" />
                </h1>
            </ItemTemplate>
        </asp:ListView>
        <asp:ObjectDataSource ID="HeaderObjectDataSource" runat="server" SelectMethod="LoadPage" TypeName="Altairis.Sewen.PageStoreManager">
            <SelectParameters>
                <asp:RouteParameter Name="name" RouteKey="slug" Type="String" DefaultValue="HomePage" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ListView runat="server" DataSourceID="HistoryObjectDataSource">
            <LayoutTemplate>
                <div class="body">
                    <table class="grid">
                        <thead>
                            <tr>
                                <th>Datum</th>
                                <th>Uživatel</th>
                                <th>IP adresa</th>
                                <th>Komentář</th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:PlaceHolder ID="ItemPlaceHolder" runat="server" />
                        </tbody>
                    </table>
                </div>
            </LayoutTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:HyperLink runat="server" NavigateUrl='<%# this.GetRouteUrl("WikiPageVersion", new { slug = Eval("Slug"), version = Eval("Version", "{0:yyyyMMddHHmmssfff}") }) %>' Text='<%# Eval("Version", "{0:d} {0:T}") %>' />
                    </td>
                    <td>
                        <asp:Literal runat="server" Text='<%# Eval("UserName") %>' />
                    </td>
                    <td>
                        <asp:Literal runat="server" Text='<%# Eval("IpAddress") %>' />
                    </td>
                    <td>
                        <asp:Literal runat="server" Text='<%# Eval("Comment") %>' />
                    </td>
                </tr>
            </ItemTemplate>
        </asp:ListView>
        <asp:ObjectDataSource ID="HistoryObjectDataSource" runat="server" SelectMethod="LoadPageVersions" TypeName="Altairis.Sewen.PageStoreManager">
            <SelectParameters>
                <asp:RouteParameter Name="name" RouteKey="slug" Type="String" DefaultValue="HomePage" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>